home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / content / nsIScriptEventHandler.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  128 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIScriptEventHandler.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIScriptEventHandler_h__
  6. #define __gen_nsIScriptEventHandler_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIScriptEventHandler */
  19. #define NS_ISCRIPTEVENTHANDLER_IID_STR "375f787f-8d3a-4344-b540-293d5645c22c"
  20.  
  21. #define NS_ISCRIPTEVENTHANDLER_IID \
  22.   {0x375f787f, 0x8d3a, 0x4344, \
  23.     { 0xb5, 0x40, 0x29, 0x3d, 0x56, 0x45, 0xc2, 0x2c }}
  24.  
  25. class NS_NO_VTABLE nsIScriptEventHandler : public nsISupports {
  26.  public: 
  27.  
  28.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISCRIPTEVENTHANDLER_IID)
  29.  
  30.   /**
  31.   * IsSameEvent:
  32.   *
  33.   * Determines if this script event handler is bound to the given
  34.   * object and event name.
  35.   *
  36.   * @param aObjectName  Name of the object raising the event.
  37.   *
  38.   * @param aEventName   Name of the event being raised.
  39.   *
  40.   * @param aArgCount    Number of arguments expected by the event handler.
  41.   *
  42.   */
  43.   /* boolean IsSameEvent (in AString aObjectName, in AString aEventName, in unsigned long aArgCount); */
  44.   NS_IMETHOD IsSameEvent(const nsAString & aObjectName, const nsAString & aEventName, PRUint32 aArgCount, PRBool *_retval) = 0;
  45.  
  46.   /**
  47.   * Invoke:
  48.   *
  49.   * Executes this script handler.
  50.   *
  51.   * @param aTargetObject  Object to which the script handler is bound.
  52.   *
  53.   * @param aArgs          Array of arguments passed to the script handler.
  54.   *                       This is an array of jsvals.
  55.   *
  56.   * @param aArgCount      Number of elements in the aArgs array.
  57.   *
  58.   */
  59.   /* void Invoke (in nsISupports aTargetObject, in voidPtr aArgs, in unsigned long aArgCount); */
  60.   NS_IMETHOD Invoke(nsISupports *aTargetObject, void * aArgs, PRUint32 aArgCount) = 0;
  61.  
  62. };
  63.  
  64. /* Use this macro when declaring classes that implement this interface. */
  65. #define NS_DECL_NSISCRIPTEVENTHANDLER \
  66.   NS_IMETHOD IsSameEvent(const nsAString & aObjectName, const nsAString & aEventName, PRUint32 aArgCount, PRBool *_retval); \
  67.   NS_IMETHOD Invoke(nsISupports *aTargetObject, void * aArgs, PRUint32 aArgCount); 
  68.  
  69. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  70. #define NS_FORWARD_NSISCRIPTEVENTHANDLER(_to) \
  71.   NS_IMETHOD IsSameEvent(const nsAString & aObjectName, const nsAString & aEventName, PRUint32 aArgCount, PRBool *_retval) { return _to IsSameEvent(aObjectName, aEventName, aArgCount, _retval); } \
  72.   NS_IMETHOD Invoke(nsISupports *aTargetObject, void * aArgs, PRUint32 aArgCount) { return _to Invoke(aTargetObject, aArgs, aArgCount); } 
  73.  
  74. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  75. #define NS_FORWARD_SAFE_NSISCRIPTEVENTHANDLER(_to) \
  76.   NS_IMETHOD IsSameEvent(const nsAString & aObjectName, const nsAString & aEventName, PRUint32 aArgCount, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsSameEvent(aObjectName, aEventName, aArgCount, _retval); } \
  77.   NS_IMETHOD Invoke(nsISupports *aTargetObject, void * aArgs, PRUint32 aArgCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->Invoke(aTargetObject, aArgs, aArgCount); } 
  78.  
  79. #if 0
  80. /* Use the code below as a template for the implementation class for this interface. */
  81.  
  82. /* Header file */
  83. class nsScriptEventHandler : public nsIScriptEventHandler
  84. {
  85. public:
  86.   NS_DECL_ISUPPORTS
  87.   NS_DECL_NSISCRIPTEVENTHANDLER
  88.  
  89.   nsScriptEventHandler();
  90.  
  91. private:
  92.   ~nsScriptEventHandler();
  93.  
  94. protected:
  95.   /* additional members */
  96. };
  97.  
  98. /* Implementation file */
  99. NS_IMPL_ISUPPORTS1(nsScriptEventHandler, nsIScriptEventHandler)
  100.  
  101. nsScriptEventHandler::nsScriptEventHandler()
  102. {
  103.   /* member initializers and constructor code */
  104. }
  105.  
  106. nsScriptEventHandler::~nsScriptEventHandler()
  107. {
  108.   /* destructor code */
  109. }
  110.  
  111. /* boolean IsSameEvent (in AString aObjectName, in AString aEventName, in unsigned long aArgCount); */
  112. NS_IMETHODIMP nsScriptEventHandler::IsSameEvent(const nsAString & aObjectName, const nsAString & aEventName, PRUint32 aArgCount, PRBool *_retval)
  113. {
  114.     return NS_ERROR_NOT_IMPLEMENTED;
  115. }
  116.  
  117. /* void Invoke (in nsISupports aTargetObject, in voidPtr aArgs, in unsigned long aArgCount); */
  118. NS_IMETHODIMP nsScriptEventHandler::Invoke(nsISupports *aTargetObject, void * aArgs, PRUint32 aArgCount)
  119. {
  120.     return NS_ERROR_NOT_IMPLEMENTED;
  121. }
  122.  
  123. /* End of implementation class template. */
  124. #endif
  125.  
  126.  
  127. #endif /* __gen_nsIScriptEventHandler_h__ */
  128.